/**
 * Created by Administrator on 2017-07-10.
 */
function ajax(url,data='',type='POST',async=false) {
    var result='';
    $.ajax({
        type: type,
        url: url,
        data: data,
        async:async,
        dataType: "json",
        beforeSend: function() {

        },
        success: function(data) {

            result=data
        }
    });

    return result;
}